package createPattern.factory.simpleFactory;

import createPattern.factory.model.Character;
import createPattern.factory.model.WeaponType;

public class CharacterFactory {

    public Character create(String name) {
        switch(name) {
            case "Diluc" :
                return new Character("迪卢克", WeaponType.CLAYMORE, "暗夜英雄的传说吗？有趣的传闻");
            case "Jean" :
                return new Character("琴", WeaponType.SWORD, "蒲公英骑士，琴，申请入队");
            case "Klee" :
                return new Character("可莉", WeaponType.CATALYST, "西风骑士团火花骑士，可莉，前来报到！");
            default:
                throw new IllegalArgumentException("暂时没有这个角色");
        }
    }
}
